home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
spred40
/
spred4.doc
< prev
next >
Wrap
Text File
|
1995-03-08
|
9KB
|
193 lines
SPRED v4.0 DOCUMENTATION
---------------------
SPRED v4.0 Sprite Editor by Ben Chadwick
Copyright (C), 1995 All rights reserved.
This program is unregistered shareware.
Please spread it to friends and enemies alike!
However, this may NOT be distributed registered or
with any of the files modified in any way!
To register, send $20 to
Ben Chadwick
678 Old Hunt Way
Herndon, Va. 22070,
USA
questions, comments, bugs, etc. should be e-mailed to
bchadwic@boom.tjhsst.edu or to the above address by normal mail.
Intro
-----
SPRED started as SPRITED a few years ago before I discovered that someone
else had used that same name for his sprite editor (it's a fairly obvious name
for a sprite editor.) So I cut out the "IT" and turned it into SPRED. I did
not plan to spread SPRED (ha-ha), but then I realized that I had put quite a
lot of work into this and other people might find it useful, and I might need
some money sometime soon. SPRED is about as user-friendly as your average
suicide pill, but hard core programmers (those who have memorized all the
Turbo C editor commands, or "vi" commands) shouldn't object.
SPRED operates in Mode X 320x240x256 colors. The sprite sizes range up
to 180x180. It automatically uses the most zoom available on the screen to
allow easy use. It uses BIOS palette commands, mainly because direct writes
didn't work on my brother's laptop.
SPRED uses a raw picture image format- no headers or trailers (although
it will load files with trailers without error.) The raw format is used for
all sorts of things, not just sprites, but SPRED is written mainly for
programmers of games and applications.
Running it
----------
To run SPRED, type SPRED4 followed by the X size, then the Y size. The
defaults (in case you leave them blank) are 16 and 16. Anything you type
after that will set the preserve-aspect-ratio flag, which means that your
sprite will be made of square grids instead of rectangular ones. (Not setting
this means you might be able to zoom further, but you might have very long
zoomed pixels.) For any square sprite it is unnecessary to bother with the
flag. The zoom box is on the right side of the screen; this is where drawing
is done.
For any sprite size 50 or under, there will be two special areas on the
left side of the screen. The upper of these two areas will be a single
version of the sprite, while the lower will be a 2x2 box of the sprite laid
out 4 times so that the user can see it as it would appear if placed next to
itself. If the sprite is between 90 and 51, there will be no 2x2 box, but the
single sprite area will still appear. Any sizes above these will not be
zoomed, so the sprite can be seen in it's normal size in the main editor box.
(You will not be able to see anything in these areas until you have started
drawing or loaded a sprite.)
Important basics
----------------
The most important things to know in SPRED are that your left button will
draw pixels (when placed inside the large box in the right side of the screen)
and the right button selects colors from anywhere on the screen. The mouse
really doesn't do anything else- most options are controlled from the keyboard.
The color selected by the right button is the color that will be drawn. The
color is displayed in the lower left corner, followed by the palette register
number, and then the red, green, and blue values.
Another important thing to know is that at any prompt, Q will cancel the
action. So if you accidentally tell it to load a sprite after 15 minutes of
work, don't worry.
Palette options
---------------
Palette files are assumed to be 768 byte files consisting of 256 three
byte chains of red, green, and then blue. I think most programs use this
format for palettes.
key action
P load a palette
O save a palette
Z raises the RED value of current color
X lowers the RED value
C raises the GREEN value
V lowers the GREEN value
B raises the BLUE value
N lowers the BLUE value
(The way, simplest way to remember those last 6 is that they are the lower
left alphabet keys on the keyboard. The position on the keyboard is about
the same as the readout on the screen.)
E changes background color for visibility.
You'll want to use 'E' if you load a palette file and the first color is
about the same as the second. Since SPRED uses the second color as the
text color and box color, if the two colors are similar it is very hard to
see what you're doing. E will flip the background color to white or black.
Sprite Manipulation
-------------------
R rotate sprite 90 degrees right (only on square sprites)
K rotate sprite 90 degrees left (only on square sprites)
The arrow keys slide the sprite around. The walls wrap around, so no data is
lost. The `End' key flips the sprite over the y axis, and `Pgdn' flips the
sprite over the x axis. `Home' inverts the sprite (exchanges x with y)
Lines, Circles, Ellipses, Boxes, Fills, and the Clipboard
---------------------------------------------------------
Normally, in graphic editing programs, it is very painful to make lines that
radiate from a point, because you constantly have to re-select the initial
point. Fortunately, SPRED does not make you do that. Since actions are done
on the keyboard, you can move the mouse while holding down a key and get
radial lines, circles, and boxes.
G starts a line at the current mouse position.
H When you hit this key, a line is drawn from G to the current position.
I starts a rectangle at X1,Y1.
J Finishes the rectangle.
W copies a section into a temporary clipboard. This also uses the starting
coordinate selected with the I key.
A Stamps the clipboard on current location.
D Flood-fills in the current color.
T Picks the origin for circles.
Y Defines the radius of a circle and draws from the point selected by T.
M defines the center of an ellipse.
[ defines the X axis of an ellipse ('M' must be defined first).
] defines the Y axis of an ellipse and draws it after you pick 'M' and '['.
Settings and Files and Exitting
-------------------------------
U Toggles filling.
If filling is on (indicated on-screen) the program will fill circles,
ellipses and rectangles.
/ tells the program to use the Fancieaux-Shmancy shading algorithm on fills.
This algorithm uses the distance from the center of a circle or ellipse to
choose a color. For rectangles, it will scan vertically or horizontally
along the palette. (The orientation is chosen by the \ key- see below.)
If you want to orient the colors to shade in the opposite direction, switch
the rectangle vertices.
\ Tells the program to use the opposite axis (vert or horiz) in bar shades.
. Tells the system to invert- that is, save and load using columns before rows.
Sometimes we want to load our sprites inverted.
L Loads a sprite. Since SPRED doesn't read or save headers, you must
remember the sprite dimensions yourself!
S Saves a sprite.
Q Prompts to see if you want to quit SPRED.
Tips & Things to try
--------------------
Among other things... The pointer for SPRED4 was created in the last
incarnation of SPRED, and can be customized. Simply run SPRED4 16 16,
and load "POINTER.PTR" and then edit the pointer to your heart's content.
Please do not distribute modified files, however.
Here is C code that will load one of SPRED's raw linear bitmaps and convert
it to a planar bitmap (stored broken into parts as first plane data, second
plane data, third plane data, fourth plane data.)
#define MAXSPRITEX (insert X size here)
#define MAXSPRITEY (insert Y size here)
#define MULT (insert X*Y divided by 4 (or shifted right twice) here)
void loadsprite(char *ch)
{
FILE *stream;
int a;
if ((stream = fopen(ch,"rb")) == NULL) printf("Error.\n");
else
for (a=0;a<MAXSPRITEX*MAXSPRITEY;a++)
fread(&spritedata[(a&3)*MULT + (a>>2)],sizeof(char),1,stream);
fclose(stream);
}
What to expect in future versions (but only if people respond to this one!)
---------------------------------------------------------------------------
I plan to add in...
- Multiple picture formats, including support for the files used in the
popular library XLIB and other mainstream formats.
- Multiple pages of sprites
- Better palette control
- More user-friendliness (heh heh) (Just don't expect Windows anytime soon)
- Better shading, more types of fills (including tiled-from-clipboard) etc.
- Miscellaneous improvements.
...Plus fix any bugs that are reported.